package com.doge.bean.base;

import lombok.Data;

import java.util.List;

/**
 * @program: doge
 * @description:
 * @author: Keyu Li
 * @create: 2021-11-29 15:37
 **/

@Data
public class BaseData {
    Integer page;
    Integer limit;
    Long total;
    Integer pages;
    /*
    * 存储查询到的数据
    * */
    List list;

    public static BaseData list(List list,long total) {
        BaseData data1 = new BaseData();
        data1.setList(list);
        data1.setTotal((Long) total);
        return data1;
    }

    public BaseData() {
    }

    public BaseData(Integer page, Integer limit, Long total, Integer pages, List list) {
        this.page = page;
        this.limit = limit;
        this.total = total;
        this.pages = pages;
        this.list = list;
    }
}
